﻿// <author>Netmon Cipher Dev Team</author>
// <date>2009-07-16</date>
// <version>1.0</version>
// <summary>This contains the variables used in Decryption.</summary>

namespace SSLDecryptionExpert
{
    using System;

    /// <summary>
    /// Stores the constant variables used in Decryption
    /// </summary>
    public class Constants
    {
        /// <summary>
        /// Sting used to determine IP version (4 or 6)
        /// </summary>
        public const string EthernetType = "Ethernet.EthernetType";

        /// <summary>
        /// string to hold Display Filter.
        /// </summary>
        public const string DisplayFilter = "SSLVersionSelector";

        /// <summary>
        /// string to hold SSL Version check Filter.
        /// </summary>
        public const string SSLVersion = "SSLVersionSelector.SSL";

        /// <summary>
        /// Sting used to construct the FilterSet for TLS Capture
        /// </summary>
        public const string VersionTLS = "TlsRecLayer.TlsRecordLayer";

        /// <summary>
        /// Sting used to construct the FilterSet for TLS Capture
        /// </summary>
        public const string VersionTLS1dot1 = "TlsRecLayer.TlsRecordLayer";

        /// <summary>
        /// Sting used to construct the FilterSet for SSL Capture
        /// </summary>
        public const string VersionSSL = "SslRecLayer.SslV3RecordLayer";

        /// <summary>
        /// Sting used to construct the FilterSet for Reassembled SSL Capture
        /// </summary>
        public const string ReassembledSslV3 = "PayloadHeader.TlsSslData.Ssl.SslRecLayer.SslV3RecordLayer";

        /// <summary>
        /// Sting used to construct the FilterSet for Reassembled SSL Capture
        /// </summary>
        public const string ReassembledTlsV1 = "PayloadHeader.TlsSslData.Tls.TlsRecLayer.TlsRecordLayer";

        /// <summary>
        /// Sting used to construct the FilterSet for Reassembled SSL Capture
        /// </summary>
        public const string ReassembledTlsV1dot1 = "PayloadHeader.TlsSslData.Tls.TlsRecLayer.TlsRecordLayer";

        /// <summary>
        /// String used to construct the FilterSet for SSL 2.0 Capture
        /// </summary>
        public const string VersionSSL2dot0 = "SslV2RecordLayer.ClientHello";

        /// <summary>
        /// string to hold supported Netmon Minor Version.
        /// </summary>
        public const string SupportedNetmonMinorString = "3.4.2345.1";

        /// <summary>
        /// string to hold supported Netmon Minor Version.
        /// </summary>
        public const string SupportedNetmonParserVersion = "03.04.2748.0001";

        /// <summary>
        /// int to hold supported Netmon Minor Version.
        /// </summary>
        public const int SupportedNetmonMinorVersion = 4;
        
        /// <summary>
        /// int to hold supported Netmon Build Version.
        /// </summary>
        public const int SupportedNetmonBuildVersion = 2345;

        /// <summary>
        /// integer to hold buffer size
        /// </summary>
        public const int BufferSize = 20000;
    
        /// <summary>
        /// Offset of the payload size in a payload heder.
        /// </summary>
        public const int PayloadHeaderSizeOffset = 124;

        /// <summary>
        /// Offset of the payload size in a payload heder.
        /// </summary>
        //public const int PayloadSSLSelectorStart = 62;

        /// <summary>
        /// Size of a payload header frame.
        /// </summary>
        public const int RawPayloadHeaderSize = 62;

        /// <summary>
        /// Size of a payload header frame.
        /// </summary>
        public const int PayloadHeader_IPv4ProtBlockSize = 36;

        /// <summary>
        /// Size of a payload header frame.
        /// </summary>
        public const int PayloadHeader_IPv6ProtBlockSize = 87;

        /// <summary>
        /// Size of a payload header frame.
        /// </summary>
        public const int PayloadHeader_TCPProtBlockSize = 68;
        /// <summary>
        /// Size of a payload header frame.
        /// </summary>
        public const int PayloadHeader_ESPProtBlockSize = 14;
    }
}
